package pacman;

import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;

import pacman.state.EndOfGame;
import pacman.state.Game;
import pacman.state.LevelLose;
import pacman.state.LevelWin;
import pacman.state.Menu;
import pacman.state.Pause;
import pacman.state.ScoreTable;

public class PacMan extends StateBasedGame {

    public PacMan() {
    	super("PacMan game");
    }

    public static void main(String[] arguments) {
		try {
		    AppGameContainer app = new AppGameContainer(new PacMan());
		    app.setDisplayMode(800, 600, false);
		    app.setShowFPS(false);
		    app.start();
		  } catch (Exception e) {
			  System.out.println(e.getMessage());
		  }
    }

    @Override
    public void initStatesList(GameContainer container) throws SlickException {
		addState(new Menu());
		addState(new Game());
		addState(new Pause());
		addState(new LevelLose());
		addState(new LevelWin());
		addState(new ScoreTable());
		addState(new EndOfGame());
    }
}